<div class="row m-n">
	<div class="crumbs-bar">
		<div yb-crumbs></div>
	</div>
	<div tabset type="tab">
		<div tab heading="采购订单变动督办单" active="activeFlag[0]" ng-click="changeTab(0)">
			<div class="row wrapper-y-sm">
				<div class="operate-bar col-xs-4 font-0">
					<button
						class="btn btn-operate m-r-sm"
						ng-disabled="!btnPermission.purchaseOrderChangeDbdEdit" title="{{!btnPermission.purchaseOrderChangeDbdEdit?'无权限执行此操作':''}}"
						ng-click="updateDbRemarkBatch()">完成确认</button>
					<button class="btn btn-operate m-r-sm" ng-click="createdThread()">生成线索</button>
				</div>
				<div class="search-bar wrapper-none col-xs-8">
					<div class="btn-group m-l-xs pull-right">
						<button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
							<i class="yb-icon ico-refresh"></i>
						</button>
						<button type="button" class="btn btn-default base-color" title="配置表格列"
							ng-click="switchToolbar('ColConfig');">
							<i class="yb-icon ico-set"></i>
						</button>
						<div class="btn btn-default base-color" ng-if="btnPermission.purchaseOrderChangeDbdExport">
							<div title="导出" yb-download download-url="exportParam.allUrl" download-param="condition" is-ajax="true">
								<i class="yb-icon ico-export-o"></i>
							</div>
						</div>
					</div>
					<button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
					<div class="input-group pull-right clearfix">
						<input type="text" class="form-control txt-search" placeholder="订单号" ng-model="condition.saleNoLike">
						<span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
					</div>
				</div>
				<div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
					reset-data="reset()">
					<div class="advance-search m-t-sm">
						<div class="form-group clearfix">
							<label class="control-label"><span>订单号</span>：</label>
							<input ng-model="condition.saleNoLike" class="form-control" placeholder="订单号">
						</div>
						<div class="form-group clearfix">
							<label class="control-label"><span>零件编号</span>：</label>
							<input ng-model="condition.materialsNoLike" class="form-control" placeholder="零件编号">
						</div>
						<div class="form-group clearfix">
							<label class="control-label"><span>零件中文名</span>：</label>
							<input ng-model="condition.materialsDesLike" class="form-control" placeholder="零件中文名">
						</div>
						<div class="form-group clearfix">
							<label class="control-label"><span>操作类型</span>：</label>
							<select class="form-control" ng-model="condition.opType">
								<option value="">请选择</option>
								<option value="1">订单驳回</option>
								<option value="2">删除订单</option>
								<option value="3">删除零件</option>
								<option value="4">调整零件数量</option>
							</select>
						</div>
						<div class="form-group clearfix m-b-none">
							<label class="control-label"><span>操作时间</span>：</label>
							<input type="text" class="form-control date-picker" ng-model="condition.queryDbdStartDate"
								datepicker-popup="{{'yyyy-MM-dd'}}"
								ng-click="showDatepickerEnd = false;showDatepickerBegin = !showDatepickerBegin"
								ng-change="checkDate(condition, 'queryDbdStartDate', 'queryDbdEndDate')" is-open="showDatepickerBegin"
								close-text="关闭" modal-size="small" readonly>
						</div>
						<div class="form-group clearfix m-b-none">
							<label class="control-label"></label>
							<label class="control-label wave-line">~</label>
						</div>
						<div class="form-group clearfix">
							<label class="control-label"></label>
							<input type="text" class="form-control date-picker" ng-model="condition.queryDbdEndDate"
								datepicker-popup="{{'yyyy-MM-dd'}}"
								ng-click="showDatepickerBegin = false;showDatepickerEnd = !showDatepickerEnd"
								ng-change="checkDate(condition, 'queryDbdStartDate', 'queryDbdEndDate')" is-open="showDatepickerEnd"
								close-text="关闭" modal-size="small" readonly>
						</div>
					</div>
				</div>
			</div>
			<div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="false"
				has-check-col="true"></div>
			<div class="main-area">
				<div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
					<div class="th-fixed">
						<table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
							<thead>
								<tr>
									<th width="40" class="text-center th-check border-l-none">
										<div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll(dataList)"></div>
									</th>
									<th ng-repeat="itemCol in tableConfig.tableCol track by $index"
										ng-show="!!itemCol.isShow && !!itemCol.isFixed" width="{{itemCol.width}}">
										<div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
											fixed-width="tbStyle.scrollLeft"></div>
									</th>
								</tr>
							</thead>
						</table>
					</div>
					<div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
						<table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
							<thead>
								<tr>
									<th ng-repeat="itemCol in tableConfig.tableCol track by $index"
										ng-show="!!itemCol.isShow && !itemCol.isFixed" width="{{itemCol.width}}">
										<div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
									</th>
								</tr>
							</thead>
						</table>
					</div>
					<div class="td-scroll-y" ng-show="dataList.length > 0">
						<table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
							<tbody>
								<tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.curRow}"
									ng-click="selectRow($index)">
									<td width="40" class="text-center border-l-none">
										<div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList)"></div>
									</td>
									<td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
										width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
										title="{{item[itemCol.dataField]}}">
										<div>
											<button type="button" class="btn btn-operate m-r-xs"
												ng-disabled="!btnPermission.purchaseOrderChangeDbdEdit||item.dbStatus==1" title="{{!btnPermission.purchaseOrderChangeDbdEdit?'无权限执行此操作':''}}"
												ng-click="updateDbRemark(item)">编辑</button>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
						<table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
							<tbody>
								<tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.curRow}"
									ng-click="selectRow($index)">
									<td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
										width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}"
										ng-show="!!itemCol.isShow && !itemCol.isFixed">
										<div ng-switch="itemCol.type">
											<div ng-switch-when="click">
												<a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
													{{item[itemCol.dataField]}}
												</a>
											</div>
											<div ng-switch-default class="spill-dots">
												<span>{{item[itemCol.dataField]}}</span>
											</div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
				</div>
			</div>
			<div class="bottom-area page-bar wrapper-y-sm clearfix">
				<div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
			</div>
		</div>
	</div>
</div>